allowFlags

Sets allowed flags. This method can be called multiple times and the result is additive. They will not overwrite each other. In most cases following grant URI permission related flags should not be allowed:

  • FLAG_GRANT_PERSISTABLE_URI_PERMISSION
  • FLAG_GRANT_PREFIX_URI_PERMISSION
  • FLAG_GRANT_READ_URI_PERMISSION
  • FLAG_GRANT_WRITE_URI_PERMISSION
Setting these flags would allow others to access URIs only your app has permission to access. These URIs could be set in intent's data, clipData and/or, in certain circumstances, extras with key of EXTRA_STREAM or EXTRA_OUTPUT. When these flags are allowed, you should sanitize URIs. See allowDataWithAuthority, allowData, allowClipDataUriWithAuthority, allowClipDataUri, allowExtraStreamUriWithAuthority, allowExtraStream, allowExtraOutput, allowExtraOutput

Return

this builder.

Parameters

flags

allowed flags.